﻿using Business.BorrowManagement.Dto;
using Business.BorrowManagement;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Dtos;
using Volo.Abp.AspNetCore.Mvc;
using Business.CheckQManagement;
using Business.CheckQManagement.Dto;

namespace Business.Controllers
{
    [RemoteService]
    [Area("Business")]
    [Route("api/business/checkq")]
    public class CheckQController : AbpController
    {
        private readonly ICheckQAppService _CheckQAppService;

        public CheckQController(ICheckQAppService CheckQAppService)
        {
            _CheckQAppService = CheckQAppService;
        }

        [HttpPost]
        [Route("data-post")]
        public Task<CheckQDto> CreateOrUpdate(CheckQDto input)
        {
            return _CheckQAppService.CreateOrUpdate(input);
        }

        [HttpPost]
        [Route("delete")]
        public Task Delete(List<Guid> ids)
        {
            return _CheckQAppService.Delete(ids);
        }

        [HttpGet]
        [Route("{id}")]
        public Task<CheckQDto> Get(Guid id)
        {
            return _CheckQAppService.Get(id);
        }

        [HttpGet]
        public Task<PagedResultDto<CheckQDto>> GetAll(GetCheckQInputDto input)
        {
            return _CheckQAppService.GetAll(input);
        }
    }
}
